<%@page import="javax.portlet.PortletSession"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
<%@ taglib prefix="portlet" uri="http://java.sun.com/portlet"%>
<%@taglib prefix="theme" uri="http://liferay.com/tld/theme" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@page import="javax.portlet.PortletURL"%>
<portlet:defineObjects/>
<theme:defineObjects/>

<script type="text/javascript">

function sayHello() {
	var listenerName = document.getElementById("sayHello").value;
	var payLoad = {helloTo: listenerName};
	Liferay.fire("sayHelloEvent", payLoad);
}


</script>

<portlet:actionURL var="setPRPURL ">
	<portlet:param name="action" value="setPRP"/>
</portlet:actionURL>

<form:form commandName="demo" name="fm2" action="<%=setPRPURL%>" method="POST">
	<table cellpadding="4">
		<tr>
			<td>Say Hello</td>
			<td><form:input path="sayHello" id="sayHello" size="30" maxlength="80" /></td>
		</tr>
		<tr>
			<td><input  type="submit" value="Set PRP" ></td>
			<td><input  type="submit" value="Set Session" ></td>
		</tr>
	</table>
</form:form>

<input type="button" value="ON/FIRE" onClick="sayHello();" >

